package com.rankeiot.platform.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.FieldNameConstants;
import org.sagacity.sqltoy.config.annotation.Column;
import org.sagacity.sqltoy.config.annotation.Entity;
import org.sagacity.sqltoy.config.annotation.Id;

import java.io.Serializable;
import java.sql.Types;
import java.util.Date;


@Schema(description = "定时任务记录")
@Data
@Entity(tableName = "t_job_log")
@FieldNameConstants
public class JobLog implements Serializable {
    @Id
    @Column(name = "id", type = Types.INTEGER)
    private long id;
    /**
     * 任务ID
     */
    @Column(name = "task_id", type = Types.VARCHAR, length = 50)
    private String taskId;
    @Column(name = "execute_time", type = Types.TIMESTAMP)
    private Date executeTime;
    @Column(name = "take_time", type = Types.INTEGER)
    private long takeTime;
    @Column(name = "status", type = Types.VARCHAR, length = 5)
    private String status;
    @Column(name = "error_info", type = Types.VARCHAR, length = 100)
    private String errorInfo;
    @Column(name = "ip", type = Types.VARCHAR, length = 30)
    private String ip;
    @Column(name = "server_id", type = Types.VARCHAR,length = 20)
    private String serverId;
    @Column(name = "user_name", type = Types.VARCHAR, length = 50)
    private String userName;
}
